home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / grafik / cataloger / picview202 / install < prev    next >
Text File  |  1996-07-15  |  7KB  |  291 lines

  1.  
  2. (SET @default-dest "Work:")
  3. (SET default_lang 0)
  4.  
  5. ; ***** english texts *****
  6.  
  7. (SET #needKick (CAT "\nPicView need Kickstart Version 39 at least." ) )
  8.  
  9. (SET #startMsg (CAT "\nWelcom to PicView 2.02 !\n\n"
  10.                      "This script installs PicView on your AMIGA.\n\n") )
  11.  
  12. (SET #destPrompt ( CAT "Please choose the destination directory for PicView.\n"
  13.                        "No extra directory will be created." ) )
  14.  
  15. (SET #copyPFiles "Copying program files")
  16.  
  17. (SET #langPrompt "Select the languages you wish to use with PicView.")
  18.  
  19. (SET #DocPrompt "Select the directory for the documentation file.")
  20.  
  21. (SET #RexxPrompt "Select the ARexx scripts you wish to install." )
  22.  
  23. (SET #IconPrompt "Select an icon set for PicView.")
  24.  
  25. (SET #NormalIcon "Normal WB Icons (4 Colors)" )
  26.  
  27. (SET #MWBIcon "Magic WB Icons (8 Colors)" )
  28.  
  29. (SET #KeyPrompt "Select the directory for the key file.")
  30.  
  31. (SET #exitMsg (CAT "Much fun with PicView 2.02 wish you\n\n"
  32.                    "Holger Papajewski" ) )
  33.  
  34.  
  35. ; ***** german texts *****
  36.  
  37. (IF (= @language "deutsch")
  38. (
  39. (SET default_lang 1)
  40.  
  41. (SET #needKick ( CAT "\nPicView benötigt mindestens die Kickstart-Version 39." ) )
  42.  
  43. (SET #startMsg (CAT "\nWillkommen bei PicView 2.02 !\n\n"
  44.                      "Diese Datei installiert PicView auf ihrem AMIGA.\n\n") )
  45.  
  46. (SET #destPrompt (CAT "Wählen Sie bitte das Zielverzeichnis für PicView.\n"
  47.                       "Es wird kein extra Verzeichnis erzeugt.") )
  48.  
  49. (SET #copyPFiles "Kopiere Programmdateien")
  50.  
  51. (SET #langPrompt "Wählen Sie die Sprachen, die Sie mit PicView benutzen wollen.")
  52.  
  53. (SET #DocPrompt "Wählen Sie ein Verzeichnis, in welches die Dokumentation kopiert werden soll.")
  54.  
  55. (SET #RexxPrompt "Wählen Sie die ARexx-Programme, die installiert werden sollen." )
  56.  
  57. (SET #IconPrompt "Wählen Sie die Art der Piktogramme für PicView." )
  58.  
  59. (SET #NormalIcon "Normale WB Piktorgramme (4 Farben)" )
  60.  
  61. (SET #MWBIcon "MagicWB Piktogramme (8 Farben)" )
  62.  
  63. (SET #KeyPrompt "Wählen Sei das Verzeichnis, in welches das Key-File kopiert werden soll.")
  64.  
  65. (SET #exitMsg (CAT "Viel Spaß mit PicView 2.02 wünscht\n\n"
  66.                    "Holger Papajewski" ) )
  67. )
  68. )
  69.  
  70. ; ***** start installation *****
  71.  
  72. (if (< (/ (GETVERSION) 65536) 39)
  73.     (ABORT #needKick)
  74. )
  75.  
  76. (MESSAGE #startMsg)
  77.  
  78. ; ***** get dest dir for PicView *****
  79.  
  80. (SET @default-dest
  81.     (ASKDIR (PROMPT  #destPrompt)
  82.             (HELP    askdir-help)
  83.             (DEFAULT @default-dest )))
  84.  
  85. (COPYFILES (SOURCE "PicView")
  86.            (HELP copyfiles-help)
  87.            (DEST @default-dest )
  88. )
  89.  
  90. ; ***** install some languages *****
  91.  
  92. (SET sprachen (ASKOPTIONS (PROMPT #langPrompt)
  93.                           (HELP   askoptions-help)
  94.                           (CHOICES "english"
  95.                                    "deutsch"
  96.                                    "dansk"
  97.                                    "norsk"
  98.                                    "français"
  99.                                    "italiano"
  100.                                    "russian"
  101.                           )
  102.                           (DEFAULT (+ default_lang 1) )
  103.               )
  104. )
  105.  
  106. (if (IN sprachen 1)
  107.     (COPYFILES (SOURCE "Locale/deutsch/PicView.catalog")
  108.                (DEST "Locale:Catalogs/deutsch") )
  109. )
  110.  
  111. (if (IN sprachen 2)
  112.     (COPYFILES (SOURCE "Locale/dansk/PicView.catalog")
  113.                (DEST "Locale:Catalogs/dansk") )
  114. )
  115.  
  116. (if (IN sprachen 3)
  117.     (COPYFILES (SOURCE "Locale/norsk/PicView.catalog")
  118.                (DEST "Locale:Catalogs/norsk") )
  119. )
  120.  
  121. (if (IN sprachen 4)
  122.     (COPYFILES (SOURCE "Locale/français/PicView.catalog")
  123.                (DEST "Locale:Catalogs/français") )
  124. )
  125.  
  126. (if (IN sprachen 5)
  127.     (COPYFILES (SOURCE "Locale/italiano/PicView.catalog")
  128.                (DEST "Locale:Catalogs/italiano") )
  129. )
  130.  
  131. (if (IN sprachen 6)
  132.     (COPYFILES (SOURCE "Locale/russian/PicView.catalog")
  133.                (DEST "Locale:Catalogs/russian") )
  134. )
  135.  
  136. ; ***** get dest for doc files *****
  137.  
  138. (SET @DocDir
  139.     (ASKDIR (PROMPT  #DocPrompt)
  140.             (HELP    askdir-help)
  141.             (DEFAULT @default-dest)
  142.             (NEWPATH)
  143.     )
  144. )
  145.  
  146. ; ***** install doc files *****
  147. (SET OForm "Orderform")
  148. (SET AFD   "AFD-COPYRIGHT")
  149.  
  150. (if (= @language "english")
  151.   (SET SDocDir  "Docs/english")
  152. )
  153.   
  154. (if (= @language "deutsch")
  155.   (
  156.     (SET OForm   "Registrierung")
  157.     (SET AFD     "AFD-COPYRIGHT.de")
  158.     (SET SDocDir "Docs/deutsch")
  159.   )
  160. )
  161.  
  162. (COPYFILES (SOURCE  SDocDir)
  163.            (DEST    @DocDir)
  164.            (CHOICES "PicView.guide" "ReadMe.mui" OForm AFD)
  165. )
  166.  
  167. ; ***** install ARexx scripts *****
  168.  
  169. (SET PVrexx (ASKOPTIONS (PROMPT #RexxPrompt)
  170.                           (HELP    askoptions-help)
  171.                           (CHOICES "SlideShow.rexx"
  172.                                    "TestExists.rexx"
  173.                                    "PictureCopy.rexx")
  174.                           (DEFAULT 15 )
  175.           )
  176. )
  177.  
  178. (IF (IN PVrexx 1)
  179.   (COPYFILES (SOURCE "rexx/SlideShow.rexx")
  180.              (DEST   "Rexx:")
  181.   )
  182. )
  183.  
  184. (IF (IN PVrexx 2)
  185.   (COPYFILES (SOURCE "rexx/TestExists.rexx")
  186.              (DEST   "Rexx:")
  187.   )
  188. )
  189.  
  190. (IF (IN PVrexx 3)
  191.   (COPYFILES (SOURCE "rexx/PictureCopy.rexx")
  192.              (DEST   "Rexx:")
  193.   )
  194. )
  195.  
  196. ; ***** install icon set *****
  197.  
  198. (SET iconSet (ASKCHOICE (PROMPT  #IconPrompt)
  199.                         (HELP    askchoice-help)
  200.                         (CHOICES #NormalIcon #MWBIcon)
  201.                         (DEFAULT 0)
  202.              )
  203. )
  204.  
  205. (IF (= IconSet 1)
  206.   (
  207.     (COPYFILES (SOURCE "MWB/PicView.info")
  208.                (DEST   @default-dest )
  209.     )
  210.     (COPYFILES (SOURCE  "MWB/guide.info")
  211.                (DEST    @DocDir)
  212.                (NEWNAME "PicView.guide.info")
  213.     )
  214.     (COPYFILES (SOURCE  "MWB/txt.info")
  215.                (DEST    @DocDir)
  216.                (NEWNAME (CAT OForm ".info"))
  217.     )
  218.   )
  219.   ;*** else ***
  220.   (
  221.     (COPYFILES (SOURCE "PicView.info")
  222.                (DEST   @default-dest)
  223.     )
  224.     (COPYFILES (SOURCE  SDocDir)
  225.                (DEST    @DocDir)
  226.                (PATTERN "#?.info")
  227.     )
  228.   )
  229. )
  230.  
  231. (TOOLTYPE (DEST     (TACKON @default-dest "PicView"))
  232.           (SETSTACK 8192)
  233.           (NOPOSITION)
  234. )
  235. (TOOLTYPE (DEST     (TACKON @DocDir "PicView.guide"))
  236.           (NOPOSITION)
  237. )
  238. (TOOLTYPE (DEST     (TACKON @DocDir OForm))
  239.           (NOPOSITION)
  240. )
  241.  
  242. ; ***** check for key file and copy it *****
  243.  
  244. (SET @keyFile "Key/PicView.key")
  245. (SET key( EXISTS @keyFile (NOREQ)))
  246.  
  247. (IF (= key 1)
  248.   (
  249.     (SET ENVexists (EXISTS "ENV:KEYPATH" ))
  250.     (IF (= ENVexists 1)
  251.       (
  252.         (SET KeyPathENV (GETENV "KEYPATH" ))
  253.         (SET ENV-choice (CAT "KEYPATH - " KeyPathENV ))
  254.         (SET KeyDest (ASKCHOICE (PROMPT  #KeyPrompt)
  255.                                 (HELP    askchoice-help)
  256.                                 (CHOICES @default-dest "S:" ENV-choice)
  257.                                 (DEFAULT 0)))
  258.       )
  259.       ; ***** no KEYPATH var found *****
  260.       (
  261.         (SET KeyDest (ASKCHOICE (PROMPT  #KeyPrompt)
  262.                                 (HELP    askchoice-help)
  263.                                 (CHOICES @default-dest "S:")
  264.                                 (DEFAULT 0)))
  265.       )
  266.     )
  267.  
  268.     (IF (= KeyDest 0)
  269.       (COPYFILES (SOURCE @keyFile)
  270.                  (DEST   @default-dest)
  271.       )
  272.     )
  273.  
  274.     (IF (= KeyDest 1)
  275.       (COPYFILES (SOURCE @keyFile)
  276.                  (DEST   "S:")
  277.       )
  278.     )
  279.  
  280.     (IF (= KeyDest 2)
  281.       (COPYFILES (SOURCE @keyFile)
  282.                  (DEST   KeyPathENV)
  283.       )
  284.     )
  285.   )
  286. )
  287.  
  288. (EXIT #exitMsg )
  289.  
  290.  
  291.